﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package Init {
    import flash.events.*;
    import Engine.Events.*;
    import Engine.Managers.*;
    import Engine.Init.*;

    public class AssetLoadingInit extends InitializationAction {

        public static const INIT_ID:String = "AssetLoadingInit";

        public function AssetLoadingInit(){
            super(INIT_ID);
            addDependency(UIInit.INIT_ID);
            addDependency(GlobalsInit.INIT_ID);
        }
        override public function execute():void{
            this.onAssetsLoaded(null);
            GlobalEngine.zaspManager.trackTimingStart("ASSET_LOADING_INIT");
        }
        protected function onAssetsLoaded(_arg1:Event):void{
            LoadingManager.getInstance().removeEventListener(LoaderEvent.ALL_HIGH_PRIORITY_LOADED, this.onAssetsLoaded);
            dispatchEvent(new Event(Event.COMPLETE));
            GlobalEngine.zaspManager.trackTimingStop("ASSET_LOADING_INIT");
        }

    }
}//package Init 
